package map;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class HashMap3 {
	public static void main(String[] args) {
		
		Map<Integer,Champ> map1=new HashMap<Integer,Champ>();
		map1.put(111,new Champ(11,"Newton"));
		map1.put(112,new Champ(12,"Bay"));
		map1.put(113,new Champ(13,"Watt"));
		map1.put(114,new Champ(14,"Lalanguage"));
		map1.put(115,new Champ(15,"Zuchongzhi"));
		map1.put(116,new Champ(16,"Zhangheng"));
		Iterator<Map.Entry<Integer, Champ>> iter=map1.entrySet().iterator();
		while(iter.hasNext()){
			System.out.println(iter.next());
		}
	}

}
class Champ{
	int num;
	String nation;
	public Champ(int num, String nation) {
		super();
		this.num = num;
		this.nation = nation;
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return this.num+"\t"+this.nation;
	}
}